package com.nexus.core.sys.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.nexus.core.query.annotation.QueryCondition;
import com.nexus.core.query.annotation.QueryType;
import com.nexus.core.service.dto.BaseDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 系统消息表
 *
 * @Date 2025/7/28 15:08
 * @Author Administrator
 **/
@Data
@EqualsAndHashCode(callSuper = false)
public class SysMessageDTO extends BaseDTO {


    /**
     * 消息类型 1：异常提醒  2：审核提醒 3商品有效期监控  4：商品库存监控
     */
    @ExcelProperty("消息类型")
    @QueryCondition(tableField = "type", type = QueryType.EQ)
    private String type;
    /**
     * 消息内容
     */
    @ExcelProperty("消息内容")
    @QueryCondition(tableField = "content", type = QueryType.EQ)
    private String content;
    /**
     * 消息标题
     */
    @ExcelProperty("消息标题")
    @QueryCondition(tableField = "title", type = QueryType.EQ)
    private String title;
    /**
     * 状态 0：未读  1：已读
     */
    @ExcelProperty("状态 0：未读  1：已读")
    @QueryCondition(tableField = "status", type = QueryType.EQ)
    private String status;
    /**
     * 发送人
     */
    @ExcelProperty("发送人")
    @QueryCondition(tableField = "send_user.id", type = QueryType.EQ)
    private SysUserDTO sendUser;
    /**
     * 发送时间
     */
    @ExcelProperty("发送时间")
    @QueryCondition(tableField = "send_time", type = QueryType.EQ)
    private LocalDateTime sendTime;
    /**
     * 接收人
     */
    @ExcelProperty("接收人")
    @QueryCondition(tableField = "receiveUser.id", type = QueryType.EQ)
    private SysUserDTO receiveUser;
    /**
     * 接收时间
     */
    @ExcelProperty("接收时间")
    @QueryCondition(tableField = "receive_time", type = QueryType.EQ)
    private LocalDateTime receiveTime;
    /**
     * 机构
     */
    @ExcelProperty("机构")
    @QueryCondition(tableField = "org.id", type = QueryType.EQ)
    private SysOrgDTO org;
}